package com.yangyang.androidconnect.phoneinfo.controller;

import com.yangyang.androidconnect.common.ApiResult;
import com.yangyang.androidconnect.phoneinfo.service.SMSService;
import com.yanzhenjie.andserver.annotation.GetMapping;
import com.yanzhenjie.andserver.annotation.RequestMapping;
import com.yanzhenjie.andserver.annotation.RequestParam;
import com.yanzhenjie.andserver.annotation.RestController;

@RestController
@RequestMapping(path = "/api/smsrecord")
public class SMSRecordController {
    @GetMapping(path = "/page-list")
    public ApiResult pageList(
            @RequestParam(value = "search", required = false, defaultValue = "") String search,
            @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
            @RequestParam(value = "pageSize", required = false, defaultValue = "200") Integer pageSize
    ) throws Exception {
        SMSService smsService = new SMSService();
        return ApiResult.ok(smsService.getAllSMSRecords());
    }
}
